import http from '@/services/http';

export function getAllList<T>() {
  return http.post<Requestor.Response<T>>('/api/admin/Department/all/list');
}
export function getAllSelectList<T>(params: DepartmentManagementApi.SelectParams) {
  return http.get<Requestor.Response<T>>('/api/admin/Department/get/subsidiary/all/list', {
    params,
  });
}
export function getInfo(params: DepartmentManagementApi.InfoParams) {
  return http.get<Requestor.Response<DepartmentManagementApi.InfoResponse>>(
    '/api/admin/Department/get/info',
    {
      params,
    },
  );
}
export function create(params: DepartmentManagementApi.CreateParams) {
  return http.post<Requestor.TeamplateResponse>('/api/admin/Department/create', {
    data: params,
  });
}
export function update(params: DepartmentManagementApi.UpdateParams) {
  return http.post<Requestor.TeamplateResponse>('/api/admin/Department/update', {
    data: params,
  });
}
export function remove(params: DepartmentManagementApi.DeleteParams) {
  return http.post<Requestor.TeamplateResponse>('/api/admin/Department/delete', {
    data: params,
  });
}
